package com.xy9860.web.bff.controller;

import com.xy9860.order.spi.OrderSpi;
import com.xy9860.user.spi.UserSpi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;
import java.util.UUID;

/**
 * @author xy9860
 * @Description 测试器
 * Copyright: Copyright (c) 2020
 * Company: Sichuan haiwujiang information technology Co., Ltd
 * @since 2020/7/1
 */
@RestController
@Slf4j
@RequestMapping("test")
public class TestController {

    @Autowired
    private UserSpi userSpi;
    @Autowired
    private OrderSpi orderSpi;

    @GetMapping("login")
    public String login() {
        return userSpi.login();
    }

    @GetMapping("order")
    public String order(String userId) {
        return orderSpi.order(userId);
    }
}
